package com.atguigu.gulimall.product.fallback;

import com.atguigu.common.exception.BizCodeEnum;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author XIAOMING
 */
@Component
@Slf4j
public class SeckillFeignServiceFallBack implements SeckillFeignService {

    @Override
    public R getSkuSeckilInfo(Long skuId) {
        log.error("降级处理 SeckillFeignService getSkuSeckilInfo skuId：{}", skuId);
        return R.error(BizCodeEnum.TO_MANY_REQUEST_FEIGN.getCode(),BizCodeEnum.TO_MANY_REQUEST_FEIGN.getMessage());
    }
}
